Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instagram viewStories #105

Merged
merged 54 commits into from
Apr 21, 2021
Merged

Instagram viewStories #105

merged 54 commits into from
Apr 21, 2021

Conversation

mrWh1te
Copy link
Owner

@mrWh1te mrWh1te commented Mar 5, 2021

Description

BotAction to viewStories and include botactions to close disruptive UX.

Related

Checklist

instagram

  • stories
    • viewStories
  • auth
    • isSaveYourLoginInfoActive
    • clickSaveYourLoginInfoYesButton
    • clickSaveYourLoginInfoNoButton
    • logout
  • nav
    • goToHome
    • goToMessaging
    • goToExplore
    • goToSettings

core

Documentation

  • setup pr
    • core code, examples
    • instagram code, examples

Publishing

  • core
  • instagram
  • record changes in changelog

- viewStories prototype
- instagram navigation botactions
- instagram save your login info UX botactions
- elementExistsInDocument & textExistsInDocument helpers
- elementExists, textExists botactions
- edge case for no element found in $ botaction #102
- viewStories wip
- needed wait 1s after clicking 1st story in top menu
- undefined edge case will not attempt to parse undefine but return
undefined
returns empty array anyway
- used in tandem in a pipe to delete cookies for urls associated with a
browser page
   - this in replace of deleteAllCookiesForCurrentUrl BotAction
- instagram logout but for a clean logout, need to clear indexeddb too
- wip deleteIndexedDB by database name
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 7, 2021

considering async events that can fail in accomplishing the task, but not break the code like interacting with IndexedDB in a deletion call by blockage

it would be nice to pass the signal through in some kind of uniform way like SuccessSignal that various BotAction's can use/return to inform the next BotAction (if piped) the status of the task, to handle it accordingly

- edge-case behavior modified -> originally threw error, now returns
undefined
@codecov
Copy link

codecov bot commented Mar 9, 2021

Codecov Report

Merging #105 (6f8f49f) into master (1e2a5bb) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #105   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           36        38    +2     
  Lines          685       668   -17     
  Branches       172       164    -8     
=========================================
- Hits           685       668   -17     
Impacted Files Coverage Δ
libs/core/src/lib/actions/branching.ts 100.00% <ø> (ø)
libs/core/src/lib/mocks/urls.ts 100.00% <ø> (ø)
libs/core/src/lib/actions/abort.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/cookies.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/indexed-db.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/input.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/local-storage.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/navigation.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/random.ts 100.00% <100.00%> (ø)
libs/core/src/lib/actions/scrapers.ts 100.00% <100.00%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e2a5bb...6f8f49f. Read the comment docs.

- these two are covered by the e2e tests added in the last commit
- ignore serialized code injected into puppeteer, covered by e2e
- run assembled botactions if a virtual dice with X sides rolls a 1
   - number of sides X is set via HO param, default is 1
   - number to roll can be set via 2nd HO param, default is 1
- rollDice() helper function
@mrWh1te mrWh1te mentioned this pull request Mar 15, 2021
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 16, 2021

another approach to randomizing BotActions #83

pipe(calculateDiceRoll(5))(
   pipeCase(pipeValue => pipeValue === 1)(
      // ...actions
   )
)

- added edge-case for dice with zero or negative number of sides which
on roll, returns 0
- rollDice() has probability limitation of no probabilities greater than
50% therefore need another botaction
- consolidate rollDice()() and probably()() ?
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 17, 2021

exploring new BotAction group: Random

  • rollDice()()
  • probably()()

related #83 (comment)

- rollDice()() botAction
- randomDiceRoll() helper similar to randomDecimal() helper
@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 26, 2021

TravisCI glitches continue
2021-03-25-225407_3440x1440_scrot
"next replenish date" appears bound to the current date

@mrWh1te
Copy link
Owner Author

mrWh1te commented Mar 29, 2021

Sent an email to TravisCI support

the glitch continues
2021-03-29-083525_3440x1440_scrot
2021-03-29-083516_3440x1440_scrot

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 8, 2021

maybe migrate the implementation https://travis-ci.com/account/migrate

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 13, 2021

  • check if problem with references when overwriting an inject variable value i.e. scrapers $ and $$
    • can unboxed injects be overwritten without effecting original

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 16, 2021

Issue has been resolved with Support at TravisCI. Thank you TravisCI!!!! Long live open-source.

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 16, 2021

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 17, 2021

  • Instagram logout function needs to specify the url of instagram for getting cookies of ONLY instagram and not ALL cookies related to the puppeteer page
    • false - by default its only the active url's cookies that are grabbed so no change required

@mrWh1te
Copy link
Owner Author

mrWh1te commented Apr 17, 2021

  • replace instagram helpers for url's or integrate them into nav botactions
    • if keep, replace functions with constants

@sonarcloud
Copy link

sonarcloud bot commented Apr 21, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 12 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Scrapers error out on not finding element by selector
1 participant